package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Department;
import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    /**
     *
     * @param queryObject
     * @return
     */
    int rows(QueryObject queryObject);

    List<?> queryForList (QueryObject qo);

    void changeState(Long id);

    Employee selectByUsername(String username);

    void deleteRoleRelation(Long id);

    void insertRoleRelation(@Param("employeeId") Long employeeId, @Param("roleId")Long roleId);

    Long[] selectRoleById(Long id);


}